/**
 * author:Administrator
 * date:2016/2/25
 * desc:TODO
 */

'use strict';

let Repo = require('./CommentRepo.js');

class Category {
  constructor(pojo) {
    pojo = pojo || {};
    this.id = pojo.id;
    this.ticketId = pojo.ticketId;

    // 以下多个id 来源于ticket
    this.vendorId = pojo.vendorId;
    this.customerId = pojo.customerId;
    this.shopId = pojo.shopId;
    this.wareId = pojo.wareId;
    this.keeperId = pojo.keeperId;

    this.content = pojo.content;
    this.scoreShop = pojo.scoreShop;
    this.scoreKeeper = pojo.scoreKeeper;
    this.scoreWare = pojo.scoreWare;
    //
    this.createdAt = pojo.createdAt;
  }

  * store() {
    return yield Repo.store(this);
  }

}

module.exports = Category;